<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class News extends Model
{
    protected $fillable = ['title' ,'channel_id' ,'is_publish' ,'img' ,'content','is_post'];


    public function get_news($channel_id){
    	// $news = self::where('is_publish',1)->where('channel_id',$channel_id)
    	// 		->get(5);
    	// return $news;
    }

    public function channel()
    {
        return $this->belongsTo( Channel::class ,'channel_id' ,'id' );
    }
}
